const coms = {}
// @ts-ignore
const onlySelf = require.context('./components', false, /.vue$/)
onlySelf.keys().forEach(key => {
  const mo = onlySelf(key).default
  key = (key as string).replace('./', '').replace('.vue', '')
  coms[key] = mo
})

export class RenderUtils {
  static getChildComponents(comName: string) {
    return coms[comName]
  }
}
